<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateFeishuCallingCardFranchiseePosterRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('feishu_calling_card_franchisee_poster_records', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('uid')->index('uid')->comment('加盟商在rms的user.id');
            $table->string('wechatUrl', 128)->comment('海报url，公有oss的path')->default('');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '加盟名片 - rms用户生成海报的历史记录';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('feishu_calling_card_franchisee_poster_records');
    }
}
